package by.pavlyukevich.paymentsystem.datamodel.erip;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;

import by.pavlyukevich.paymentsystem.datamodel.AbstractEntity;
import by.pavlyukevich.paymentsystem.datamodel.payment.PaymentDetail;

@Entity
public class EripName extends AbstractEntity<Integer> {

	@Column
	private String name;

	@ManyToMany
	@JoinTable(name = "payment_2_erip_name", joinColumns = @JoinColumn(name = "erip_name_id"), inverseJoinColumns = @JoinColumn(name = "payment_detail_id"))
	private Set<PaymentDetail> paymentDetails;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<PaymentDetail> getPaymentDetails() {
		return paymentDetails;
	}

	public void setPaymentDetails(Set<PaymentDetail> paymentDetails) {
		this.paymentDetails = paymentDetails;
	}

}
